package fr.excilys.gwt.widgets.client;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Widget;

public class FormInput extends Composite {

	private Label label;

	private Widget input;

	public FormInput(String label, Widget input) {
		HorizontalPanel mainPanel = new HorizontalPanel();
		this.label = new Label(label);
		this.label.setStyleName("formLabel");
		this.input = input;
		this.input.setStyleName("formInput");

		mainPanel.add(this.label);
		mainPanel.add(this.input);

		initWidget(mainPanel);
	}
}
